package com.tansun.easycare.rule.common.jfun;

import java.util.HashMap;
import java.util.Map;

import com.tansun.easycare.rule.common.model.BaseBean;

/**
 * 规则集中的函数
 *
 * @author WY
 */
public class JFun extends BaseBean {
    //分类
    /**
     * 精确计算 	ftarit
     */
    public static final String FT_ARIT = "ftarit";    //
    /**
     * 数学计算 	ftmath
     */
    public static final String FT_MATH = "ftmath";    //
    /**
     * 日期计算 	ftdate
     */
    public static final String FT_DATE = "ftdate";    //
    /**
     * 统计计算 	ftstat
     */
    public static final String FT_STAT = "ftstat";    //
    /**
     * 自定义函数 ftcust
     */
    public static final String FT_CUST = "ftcust";    //
    /**
     * 描述
     */
    private String desc;
    /**
     * 数据类型
     */
    private String dataType;
    /**
     * 显示格式
     */
    private String showFormat;
    /**
     * 名称
     */
    private String drlName;
    /**
     * 功能分类
     */
    private String funType;
    /**
     * string 参数名 JFunParam 参数
     */
    private Map<String, JFunParam> paramMap = new HashMap<String, JFunParam>();
    //private List<JFunParam> paramList = new ArrayList<JFunParam>();

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public String getShowFormat() {
        return showFormat;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setShowFormat(String showFormat) {
        this.showFormat = showFormat;
    }

    public Map<String, JFunParam> getParamMap() {

        return paramMap;
    }

    public void setParamMap(Map<String, JFunParam> paramMap) {
        this.paramMap = paramMap;
    }

    public String getFunType() {
        return funType;
    }

    public void setFunType(String funType) {
        this.funType = funType;
    }

    public String getDrlName() {
        return drlName;
    }

    public void setDrlName(String drlName) {
        this.drlName = drlName;
    }

    public String[] sortParamName() {
        String[] parray = new String[16];
        for (JFunParam jfp : this.paramMap.values()) {
            parray[jfp.getSort()] = jfp.getName();

        }
        return parray;

    }

}
